using System;
using System.Collections.Generic;
using System.Text;
using MbUnit.Framework;
using NetSpider.Retrieval;

namespace NetSpider.Tests
{
    [TestFixture]
    public class TestUriHelper
    {
        [Test]
        public void Ensure_that_UriHelper_resolves_URI_schemas_properly()
        {
            Assert.AreEqual("http", UriHelper.GetUriSchema("http://www.somedomain.com/index.htm"));
            Assert.AreEqual("https", UriHelper.GetUriSchema("https://www.somedomain.com/index.htm"));
            Assert.AreNotEqual("http", UriHelper.GetUriSchema("https://www.somedomain.com/index.htm"));
            Assert.AreNotEqual("https", UriHelper.GetUriSchema("http://www.somedomain.com/index.htm"));
            Assert.AreEqual("file", UriHelper.GetUriSchema("file:///c:/Windows/System32/xcopy.exe"));
        }
    }
}
